package com.jiawa.wiki.config;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * 主函数
 *
 * @author 荀彧 2021/5/17
 */
@SpringBootApplication
@ComponentScan("com.jiawa")
@MapperScan("com.jiawa.wiki.mapper")
@Slf4j
@EnableScheduling
@EnableAsync
public class WikiApplication {
    public static void main(String[] args) {
        SpringApplication app = new SpringApplication(WikiApplication.class);
        Environment environment = app.run(args).getEnvironment();
        log.info("启动成功");
        log.info("地址：\t http://127.0.0.1:{}",environment.getProperty("server.port"));
    }
}

